/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Row, Col, Card, Button } from "antd";
import React from "react";
import Link from "umi/link";
import style from "../style";

const TodoWrap = props => {
  const {
    todoWrap: { colSpanNum, cardStyle },
    background,
  } = style;
  const { data = {} } = props;
  const { codNum = 0, distributedNum = 0 } = data;
  return (
    <div className="todo-container" style={background}>
      <Row type="flex" gutter={[20,0]}>
        <Col span={colSpanNum}>
          <Card title="待分配订单" style={cardStyle}>
            <span style={{ marginRight: "19px" }}>{distributedNum}</span>
            <Button type="primary">
              <Link to="/Order/OrderDetails?orderSource=16">分配</Link>
            </Button>
          </Card>
        </Col>
        <Col span={colSpanNum}>
          <Card title="待收款订单" style={cardStyle}>
            <span style={{ marginRight: "19px" }}>{codNum}</span>
            <Button type="primary">
              <Link to="/Order/OrderDetails?orderSource=17">查看</Link>
            </Button>
          </Card>
        </Col>
      </Row>
    </div>
  );
};

export default TodoWrap;
